/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package feesmodule;

import feesmodule.converter.AreasConverter;
import feesmodule.services.IDataService;
import feesmodule.services.ServicesModule;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

/**
 *
 * @author Oleg
 */
@Path("areas")
@Produces("application/txt")
public class AreasResource
{
    @GET
    public AreasConverter getAreas()
    {
        IDataService dataService = ServicesModule.getTheInjector().getInstance(IDataService.class);
        return new AreasConverter(dataService.getAreaDefinitions());
    }
}
